import request from '@/utils/request'

// 查询终端
export function getTerminal (data) {
  return request({
    url: '/docking/getTerminalList',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json',
      // 'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': window.localStorage.getItem('token'),
    }
  })
}

// 查询详情
export function getDetail (data) {
  return request({
    url: '/docking/findOneTerminal',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json',
      'Authorization': window.localStorage.getItem('token'),
    }
  })
}

// 查询设备数据
export function getData (data) {
  return request({
    url: '/docking/findTerminalTypeData',
    method: 'get',
    params: data,
    headers: {
      // 'Content-Type': 'application/json',
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': window.localStorage.getItem('token'),
    }
  })
}

// 获取终端指令列表
export function getInstruct (data) {
  return request({
    url: '/docking/cmdAndValue',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json',
      // 'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': window.localStorage.getItem('token'),
    }
  })
}